// es6
class Factory {
    constructor(name) {
        const aa = '123123'
        this.name = name
    }
}
Factory.prototype.param = 'jk'
let fa = new Factory('jack')


// es5
function Factoryd(params) {
    this.params = params
}

Factoryd.prototype.param = 'kkk'
let ff = new Factoryd('ca')

console.log(ff, fa)